package ModelLayer;

/**
 * Write a description of class Item here.
 * Get metoden for Item
 * @author (dmab0913 Gruppe4) 
 * @version (1.0)
 */
public class Item
{
    private int itemId;
    private String description;
    private int quantity;
    private double pricePrPackage;
    private int sizePrPackage;
    private double pricePrItem;
    private int locationNumber;
    private int maxStock;
    private int minStock;

    /**
     * Constructor for objects of class Item
     * Get metoden
     */
    public Item(int itemId, String description, int quantity, double pricePrPackage, int sizePrPackage, double pricePrItem, int locationNumber, int maxStock, int minStock)
    {
        // initialise instance variables
        this.itemId = itemId;
        this.description = description;
        this.quantity = quantity;
        this.pricePrPackage = pricePrPackage;
        this.sizePrPackage = sizePrPackage;
        this.pricePrItem = pricePrItem;
        this.locationNumber = locationNumber;
        this.maxStock = maxStock;
        this.minStock = minStock;
    }

    /**
     * Return itemId
     */
    public int getItemId()
    {
        return itemId;
    }

    /**
     * Return description
     */
    public String getDescription()
    {
        return description;
    }

    /**
     * Return quantity
     */
    public int getQuantity()
    {
        return quantity;
    }

    /**
     * Return pricePrPackage
     */
    public double getPricePrPackage()
    {
        return pricePrPackage;
    }

    /**
     * Return sizePrPackage
     */
    public int getSizePrPackage()
    {
        return sizePrPackage;
    }

    /**
     * Return pricePrItem
     */
    public double getPricePrItem()
    {
        return pricePrItem;
    }

    /**
     * Return locationNumber
     */
    public int getLocationNumber()
    {
        return locationNumber;
    }

    /**
     * Return maxStock
     */
    public int getMaxStock()
    {
        return maxStock;
    }

    /**
     * Return minStock
     */
    public int getMinStock()
    {
        return minStock;
    }

    /**
     * mutator method to set an itemId
     */
    public void setItemId(int itemId)
    {
        this.itemId = itemId;
    }

    /**
     * mutator method to set a description
     */
    public void setDescription(String description)
    {
        this.description = description;
    }

    /**
     * mutator method to set quantity
     */
    public void setQuantity(int quantity)
    {
        this.quantity = quantity;
    }

    /**
     * mutator method to set pricePrPackage
     */
    public void setPricePrPackage(double pricePrPackage)
    {
        this.pricePrPackage = pricePrPackage;
    }

    /**
     * mutator method to set sizePrPackage
     */
    public void setSizePrPackage(int sizePrPackage)
    {
        this.sizePrPackage = sizePrPackage;
    }

    /**
     * mutator method to set pricePrItem
     */
    public void setPricePrItem(double pricePrItem)
    {
        this.pricePrItem = pricePrItem;
    }

    /**
     * mutator method to set locationNumber
     */
    public void setLocationNumber(int locationNumber)
    {
        this.locationNumber = locationNumber;
    }

    /**
     * mutator method to set maxStock
     */
    public void setMaxStock(int maxStock)
    {
        this.maxStock = maxStock;
    }

    /**
     * mutator method to set minStock
     */
    public void setMinStock(int minStock)
    {
        this.minStock = minStock;
    }

    /**
     * mutator method to set all fields except for itemId
     */
    public void updateItem(String description,int quantity, double pricePrPackage, int sizePrPackage, double pricePrItem, int locationNumber, int maxStock, int minStock)
    {   
        this.description = description;
        this.quantity = quantity;
        this.pricePrPackage = pricePrPackage;
        this.sizePrPackage = sizePrPackage;
        this.pricePrItem = pricePrItem;
        this.locationNumber = locationNumber;
        this.maxStock = maxStock;
        this.minStock = minStock;
    }
}
